-
Notifications
You must be signed in to change notification settings - Fork 0
Export Single Graph to PDF 📂 - Will & Justin #48 #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Single Graph to PDF 📂 - Will & Justin #48 #53
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tika
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few things that you need to uncomment
| "dotenv": "^17.2.3", | ||
| "drizzle-orm": "^0.44.7", | ||
| "framer-motion": "^12.23.24", | ||
| "html2canvas": "^1.4.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why install a dep if you're not going to use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: call this file export-to-pdf.ts. it's cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
src/components/Dashboard.tsx
Outdated
|
|
||
| import { useEffect, useState } from "react"; | ||
| import { toast } from "sonner"; | ||
| //import { toast } from "sonner"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
| //const isAuthPage = pathname === "/signin"; | ||
|
|
||
| // If on auth pages, just render children without sidebar | ||
| if (isAuthPage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
Sprint
Export Single Graph to PDF 📂 - Will & Justin #48
Who worked on this sprint?
Will and Justin
Features Implemented
Exporting a bar/line graph to a pdf
New files created
/src/lib/exporttopdf.ts
Existing files modified
/src/app/graphs/page.tsx
/src/components/BarGraph.tsx
/src/components/LineGraph.tsx
Acceptance Criteria
The export button downloads the graph in current view to a PDF
PDF does not cut-off any part of the graph (i.e. looks identical to browser)
Filters are captured in the exported PDF
Exporting works across all major browsers
Export button is responsive while loading and resets once finished
UI matches Figma
Code runs locally without errors and builds successfully
Merge via PR
Testing: how did you test?
Tried exporting a variety of bar/line graphs on different browsers
Features Not Implemented/Incomplete
Loading feature is not developed
Screenshots:
https://github.com/user-attachments/assets/3e07764d-a093-41ea-8fda-49cf29ce59cc
Tag Dan and Shayne
@danglorioso @shaynesidman